package com.example.music.Utils;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

public class MyViewModel extends ViewModel {
    private MutableLiveData<Boolean> Mode_loginFlag = new MutableLiveData<>();  //显示登录状态
    private MutableLiveData<String> Mode_curSongId = new MutableLiveData<>();   //当前正在播放的音乐ID
    private MutableLiveData<Boolean> variable3 = new MutableLiveData<>();
    private MutableLiveData<MusicPlayer> playerMode = new MutableLiveData<>();

    public void setMode_loginFlag(Boolean data) {
        Mode_loginFlag.setValue(data);
    }

    public LiveData<Boolean> getMode_loginFlag() {
        return Mode_loginFlag;
    }

    public void setVariable2(String data) {
        Mode_curSongId.setValue(data);
    }

    public LiveData<String> getVariable2() {return Mode_curSongId;}

    public void setVariable3(Boolean data) {
        variable3.setValue(data);
    }

    public LiveData<Boolean> getVariable3() {
        return variable3;
    }
}

